<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends Controller {
    public function index(){
    	$users = M('user')->select();
    	$this->assign('users',$users);
        $this->display();
    }
    public function memberstop()
    {
    	$uid = I('post.uid');

    	if(M('user')->where(array('id'=>$uid))->save(array('stop'=>1))){
    		$arr = array(
    			'error'=>0,
    			'info'=>'已停用'
    			);
    		echo json_encode($arr);
    		exit;

    	}else{
    		$arr = array(
    			'error'=>1,
    			'info'=>'停用失败'
    			);
    		echo json_encode($arr);
    		exit;
    	}
    }
}